package com.roads.agency.service.impl;

import com.roads.project.domain.ProReport;
import com.roads.project.mapper.ProReportMapper;
import com.roads.agency.service.IAgencyReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ReportServiceImpl
 * @Description 报表service实现类
 * @Author nhp
 * @Date 2023/8/9 0010 15:39
 * @Version 1.0.0
 **/
@Service
public class AgencyReportServiceImpl implements IAgencyReportService {

    @Autowired
    private ProReportMapper proReportMapper;

    /**
     * 报表列表
     *
     * @param projectId 项目ID
     * @param userId 用户ID
     * @param reportType 报表类型
     * @return 报表集合
     */
    @Override
    public List<ProReport> selectReportList(Integer projectId, Long userId, String reportType) {
        ProReport search = new ProReport();
        search.setProjectId(projectId);
        search.setUserId(userId);
        search.setReportType(reportType);
        return proReportMapper.selectModelListByUser(search);
    }

}
